package com.example.twoscroolview;

import android.app.Application;
import android.content.Context;
import android.os.Handler;
import android.os.Process;

public class MyApp extends Application {

    public Context context;
    public Handler handler;
    public  int mainThreadId;
    public static MyApp instance;
    @Override
    public void onCreate() {
        super.onCreate();
        instance = this;
        context = getApplicationContext();
        handler = new Handler();
        //判断当前线程是主线程还是子线程
        mainThreadId = Process.myTid();

    }
}
